<!--

   通用产品选 择,
   $_GET['type'] == 1   单选
                 == 2   多选

-->
<div class="bjui-pageHeader">
    <div class="pull-right">
        <!-- Think.get.type  == 2  多选 -->
        <eq name="Think.get.type" value="2">
            <input type="checkbox" name="lookupType" value="1" data-toggle="icheck" data-label="追加" checked>
            <button type="button" class="btn-blue" data-toggle="lookupback" data-lookupid="ids" data-warn="请至少选择一项" data-icon="check-square-o">选择勾选</button>
        </eq>
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('goods')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
        <div class="bjui-searchBar">
            <label>所有分类:</label>
            <select name="class_id" data-toggle="selectpicker">
                <option value="0">--请选择--</option>
                <volist name="res" id="vo">
                   <option value="{$vo.id}" <if condition="I('class_id') eq $vo['id']">selected</if>>{$vo.name}</option>
                </volist>
            </select>
            <label>品牌:</label>
            <select name="brandid" data-toggle="selectpicker">
                <option value="0">--请选择--</option>
                <volist name="brandlist" id="bo">
                <option value="{$bo.id}" <if condition="I('brandid') eq $bo['id']">selected</if>>{$bo.name}</option>
                </volist>
            </select>
            <label>推荐类型:</label>
            <select name="commend_id" data-toggle="selectpicker">
                <option value="1">--请选择--</option>
                <volist name="commend" id="co">
                  <option value="{$co.id}" <if condition="I('commend_id') eq $co['id']">selected</if>>{$co.name}</option>
                </volist>
            </select>
            <label>名称:</label>
            <input type="text" name="name" value="{:I('name')}" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <eq name="Think.get.type" value="2">
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            </eq>
            <th>图片</th>
            <th>商品名称</th>
            <th>规格</th>
            <th>现价</th>
            <th>库存</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr>
            <eq name="Think.get.type" value="2">
                <td width="26"><input type="checkbox" value="{pro_id:<php>echo $vo['id']</php>, pro_name:'<php>echo $vo['name']</php>',pro_stock:<php>echo $vo['store_nums']</php>,pro_price:<php>echo $vo['sell_price']</php>}" class="checkboxCtrl" name="ids" data-toggle="icheck"></td>
            </eq>
            <td><img src="{$vo.img}" width="70"/></td>
            <td>{$vo.name}</td>
            <td>{:spec_detail($vo['goods_id'],$vo['spec_array'])}</td>
            <td>{$vo.sell_price}</td>
            <td>{$vo['store_nums']}</td>
            <td>
                <button type="button" class="btn-green" data-toggle="lookupback" data-args="{pro_id:<php>echo $vo['id']</php>, pro_name:'<php>echo $vo['name']</php>',pro_stock:<php>echo $vo['store_nums']</php>, pro_price:<php>echo $vo['sell_price']</php>}">选</button>
            </td>
        </tr>
        </volist>
        </tbody>
    </table>
</div>
<include file="Common/footer" ftype="page" />